package models

import (
	"gorm.io/gorm"
	"time"
)

type Host struct {
	Id        int            `gorm:"primaryKey" json:"id"`
	Name      string         `gorm:"name" json:"name"`
	Ip        string         `gorm:"ip" json:"ip"`
	User      string         `gorm:"user" json:"user"`
	Password  string         `gorm:"password" json:"password"`
	Port      int            `gorm:"port" json:"port"`
	Shell     string         `gorm:"shell;default:bash" json:"shell"`
	CreatedAt time.Time      `gorm:"autoCreateTime"`
	UpdatedAt time.Time      `gorm:"autoUpdateTime"`
	DeletedAt gorm.DeletedAt `gorm:"index"`
}

func (m *Host) Host() string {
	return "host"
}
